package org.nt4b.schemadoc.core.dao;

import java.util.List;

import org.nt4b.schemadoc.core.dom.Table;


public interface SchemaDocDAO {
    
    /**
     * Reads the whole schema comments
     * Returns a list of all tables with appropriate columns
     * 
     * @return
     */
    List<Table> getSchemaComments(final String schemaName);
    
    /**
     * Reads only table comments, no columns comments
     * 
     * @return
     */
    List<Table> getTableComments(final String schemaName);
    
    /**
     * Reads only single table comments with column comments
     * 
     * @param tableName
     * @return
     */
    Table getTableComments(final String schemaName, final String tableName);
    
    /**
     * Save all provided comments,
     * if column comments are missing, skip saving.
     * 
     * @param tables
     */
    void save(List<Table> tables);
}
